@extends('Common.Views.main')
@section("content")
    <div class="layui-body">
        <div class=" layui-tab-brief">
            <div class="layui-breadcrumb-box">
                {{adminNav($thisAction)}}
            </div>
        </div>
        <!-- 内容主体区域 -->
        <div id="region-action" class="layui-row" style="padding:10px;">
            <blockquote class="site-text layui-elem-quote">
                <form class="layui-form" action="">
                    <div class="layui-inline">
                        <select id="state" name="state" lay-filter="state" placeholder="">
                            <option value="">用户状态</option>
                            <option value="1">正常</option>
                            <option value="2">黑名单</option>
                        </select>
                    </div>
                    <div class="layui-inline">
                        <input type="text" name="keyword" value="" class="layui-input" placeholder="请输入搜索关键词">
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="formSearch"><i class="layui-icon">&#xe615;</i>搜索</button>
                        <button type="reset" class="layui-btn layui-btn-warm reset"><i class="layui-icon">&#x1006;</i>重置</button>
                        @if(actionIsView("add_users"))
                            <a href="javascript:;" data-method="add" class="layui-btn handle"><i class="layui-icon">&#xe61f;</i>添加用户</a>
                        @endif
                    </div>
                </form>
            </blockquote>
            <div class="layui-form">
                <table class="layui-table">
                    <colgroup>
                        <col width="100">
                        <col>
                        <col>
                        <col>
                        <col>
                        <col width="90">
                        <col width="200">
                    </colgroup>
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>用户昵称</th>
                        <th>手机号</th>
                        <th>会员等级</th>
                        <th>消费金额</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody id="listbox"></tbody>
                </table>
            </div>
            <div id="pages"></div>
        </div>
    </div>
    <!--添加用户-->
    <div  class="layui-form">
        <form id="addUser" class="layui-form" style="display: none">
            <div class="layui-form-item" style="padding:0px 10px;">
                {{ csrf_field() }}
                <label class="layui-label">用户名称：</label>
                <input id="menuId" type="hidden" name="id" value="" />
                <input id="name" type="text" name="name" required  lay-verify="required" placeholder="请输入用户名称" autocomplete="off" class="layui-input layui-form-danger">
                <label class="layui-label">手机号码：</label>
                <input id="mobile" type="text" name="mobile" required  lay-verify="required" placeholder="请输入手机号码" autocomplete="off" class="layui-input layui-form-danger">
                <label class="layui-label">密码： </label>
                <input id="password" type="text" name="password" required  lay-verify="required" placeholder="请输入账号密码" autocomplete="off" class="layui-input layui-form-danger">
            </div>
        </form>
    </div>
    <!--添加用户-->
@stop
@section("javascript")
    <script>
        //向js端传递授权信息
        is_edit = "{{actionIsView("edit_users")}}";
        is_blacklist = "{{actionIsView("blacklist_users")}}";
        //console.log(is_blacklist);
    </script>
    <script src="{{asseturl("js/User/user.js")}}"></script>
@stop
